<template>
	<view class="no_take_photo">
		<image style="width:440rpx" src="https://qiniu-bjjrzy.bjjrzy.com/bjupi/practice/cognPractice/improve/camera/noCamera.png"></image>
		<view class="no_photo_title" style="flex-direction: row;align-items: center;display: flex;">
			<u-icon name="error-circle-fill" size="48rpx" color="#FFC700"></u-icon>
			<view class="noPhoto_title">
				系统未检测到摄像头
			</view>
		</view>
		<view class="remark_part" v-if="recognitionSkipType === 2">
			<view>请检测摄像头/访问权限，如仍不能解决问题，</view>
			<view style="margin-top: 20rpx;">请您点击求助，联系考务人员～</view>
		</view>
		
		<view class="remark_part" v-else>
			<view>请检测摄像头/访问权限.</view>
			<!-- 占位高度 -->
			<view style="height:40rpx;"></view>
		</view>

		<view class="help_button">
<!--			<u-button @click="handleHelp" v-if="recognitionSkipType === 2" type="primary" color="linear-gradient(180deg, #2B5182 0%, #258FF0 100%)"
				text="求助"></u-button>-->
		</view>


	</view>
</template>

<script>
	export default {
		name: "NoFacialPhotoContainer",
		data() {
			return {
				recognitionSkipType: ''
			};
		},
		props: [],
		created() {
			const {
				recognitionSkipType
			} = wx.getStorageSync('examLoginData');
			// 求助考务处理2，上传拍照是1
			this.recognitionSkipType = recognitionSkipType;
		},
		methods: {
			handleHelp() {
				const type = this.$store.state.photoProgressData.type;
				examResortStatus(type, 1, "").then(res => {
					this.$store.commit('updateProgressData', {
						progressPhoto: 5,
						uuid: res
					});
				})
			}
		},
	}
</script>

<style lang="scss">
	.no_take_photo {
		width: 100%;
		height: 100vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-end;

		// position: absolute;
		// top:0;
		// left:0;
		.no_photo_title {
			padding: 80rpx 0px;

			.noPhoto_title {
				color: #333;
				padding-left: 15rpx;
				font-size: 16px;
				font-weight: 700;
			}
		}

		.remark_part {
			color: #333;
			text-align: center;
			font-size: 26rpx;
		}

		.help_button {
			width: 50%;
			height: 60rpx;
			margin: 400rpx 0rpx 100rpx 0rpx;
		}
	}
</style>